/// <summary>
/// 资源任务
/// </summary>
public abstract partial class AbsHFTask : IHFCancel
{
    /// <summary>
    /// 当前任务是否取消
    /// </summary>
    public bool isCancel { get; private set; }

    /// <summary>
    /// 取消当前任务
    /// </summary>
    public void Cancel()
    {
        isCancel = true;
        OnCancel();
    }

    /// <summary>
    /// 取消当前任务
    /// </summary>
    protected virtual void OnCancel() { }
}